package com.gxa.learning.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 项目详情表
 *
 * @Author lirucong
 * @Date 10:58 2021/12/2
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_project_details")
@ApiModel
public class ProjectDetails implements Serializable {

    /**
     * 所属的项目
     */
    @ApiModelProperty(name = "project", value = "project", dataType = "Project", example = "所属的项目")
    private Project project;

    /**
     * 培训项目详情编号
     */
    @Id
    @Column(name = "details_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(name = "detailsId", value = "detailsId", dataType = "Long", example = "培训项目详情编号")
    private Long detailsId;
    /**
     * 项目编号
     */
    @Column(name = "project_id")
    @ApiModelProperty(name = "projectId", value = "projectId", dataType = "Long", example = "项目编号")
    private Long projectId;

    /**
     * 培训描述
     */
    @Column(name = "project_desc")
    @ApiModelProperty(name = "projectDesc", value = "projectDesc", dataType = "String", example = "培训描述")
    private String projectDesc;
    /**
     * 培训类别编号
     */
    @Column(name = "type_id")
    @ApiModelProperty(name = "typeId", value = "typeId", dataType = "Long", example = "培训类别编号")
    private Long typeId;

    private Type type;
    /**
     * 推荐等级编号
     */
    @Column(name = "level_manager_id")
    @ApiModelProperty(name = "levelManagerId", value = "levelManagerId", dataType = "Long", example = "推荐等级编号")
    private Long levelManagerId;
    /**
     * 培训形式
     */
    @Column(name = "project_form")
    @ApiModelProperty(name = "projectForm", value = "projectForm", dataType = "String", example = "培训形式")
    private String projectForm;
    /**
     * 培训计划编号
     */
    @Column(name = "plan_id")
    @ApiModelProperty(name = "planId", value = "planId", dataType = "Long", example = "培训计划编号")
    private Long planId;

    private TrainPlan plan;
    /**
     * 培训预算
     */
    @Column(name = "project_budget")
    @ApiModelProperty(name = "projectBudget", value = "projectBudget", dataType = "BigDecimal", example = "培训预算")
    private BigDecimal projectBudget;
    /**
     * 报名人数
     */
    @Column(name = "num")
    @ApiModelProperty(name = "num", value = "num", dataType = "Integer", example = "报名人数")
    private Integer num;
    /**
     * 报名截止时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "apply_endTime")
    @ApiModelProperty(name = "applyEndTime", value = "applyEndTime", dataType = "Date", example = "报名截止时间")
    private Date applyEndTime;
    /**
     * 报名审核人
     */
    @Column(name = "auditor")
    @ApiModelProperty(name = "auditor", value = "auditor", dataType = "String", example = "报名审核人")
    private String auditor;
    /**
     * 报名形式
     */
    @Column(name = "apply_form")
    @ApiModelProperty(name = "applyForm", value = "applyForm", dataType = "String", example = "报名形式")
    private String applyForm;
    /**
     * 培训开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "project_startTime")
    @ApiModelProperty(name = "projectStartTime", value = "projectStartTime", dataType = "Date", example = "培训开始时间")
    private Date projectStartTime;
    /**
     * 培训结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "project_endTime")
    @ApiModelProperty(name = "projectEndTime", value = "projectEndTime", dataType = "Date", example = "培训结束时间")
    private Date projectEndTime;
    /**
     * 培训地点
     */
    @Column(name = "project_address")
    @ApiModelProperty(name = "projectAddress", value = "projectAddress", dataType = "String", example = "培训地点")
    private String projectAddress;
    /**
     * 培训讲师（可多个,多个讲师用逗号隔开）
     */
    @Column(name = "lecturer")
    @ApiModelProperty(name = "lecturer", value = "lecturer", dataType = "String", example = "培训讲师（可多个,多个讲师用逗号隔开）")
    private String lecturer;
    /**
     * 学习形式
     */
    @Column(name = "study_form")
    @ApiModelProperty(name = "studyForm", value = "studyForm", dataType = "String", example = "学习形式")
    private String studyForm;
    /**
     * 证书编号
     */
    @Column(name = "tb_certificate_id")
    @ApiModelProperty(name = "certificateId", value = "certificateId", dataType = "Long", example = "证书编号")
    private Long certificateId;
    /**
     * 是否需要签到（0表示没有签到、1表示需要签到）
     */
    @Column(name = "sign_in")
    @ApiModelProperty(name = "signIn", value = "signIn", dataType = "Boolean", example = "是否需要签到（0表示没有签到、1表示需要签到）")
    private Boolean signIn;
    /**
     * 培训价格
     */
    @Column(name = "project_price")
    @ApiModelProperty(name = "projectPrice", value = "projectPrice", dataType = "BigDecimal", example = "培训价格")
    private BigDecimal projectPrice;

    /**
     * 申请是否需要审核
     */
    @Column(name = "apply_required")
    @ApiModelProperty(name = "applyRequired", value = "applyRequired", dataType = "Boolean", example = "是否需要培训")
    private Boolean applyRequired;
}
